﻿using System;
namespace Green.AgileMapper
{
    public interface ICodeGenerator<From>
    {
        /// <summary>
        /// 代码生成策略
        /// </summary>
        IAgileMapperTemplateStrategy AgileMapperTemplateStrategy
        {
            get;
        }

        void ApplyAgileMapperTemplateStrategy(IAgileMapperTemplateStrategy strategy);

        /// <summary>
        /// 代码生成
        /// </summary>
        /// <param name="fromObj"></param>
        /// <returns></returns>
        string CodeGenerator(From fromObj);
        /// <summary>
        /// 代码生成,From Type必须new();
        /// </summary>
        /// <returns></returns>
        string CodeGenerator();
    }
}
